<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/commons/taglibs.jsp" %>
<SCRIPT type="text/javascript">
	$(document).ready(function(){
		$("#orgCode").bind("blur", function(){
			var orgCode = $("#orgCode").val(),porgCode = $("#porgCode").val();
			$.ajax({   
			    url:'${ctx}/management/org/checkOrgCode.do?orgCode='+orgCode+"&porgCode="+porgCode,   
			    type:'post',   
			    async : true, //默认为true 异步   
			    error:function(){   
			       alert('error');   
			    },   
			    success:function(data){
			    	var rtnObj = eval('(' + data + ')');
			    	if(!rtnObj.isFlag){
			    		$("#orgCode").alertmsg('error', rtnObj.msg);
			    		$("#orgCode").val("");
			    	}
			    }
			});
		})
	})
</SCRIPT>			
<div class="bjui-pageContent">
    <form action="${ctx}/management/org/add.do" data-toggle="validate" data-reload-navtab="true">
      <input type="hidden" name="sysCode" value="${vo.sysCode}">
        <div class="pageFormContent" data-layout-h="0">
            <table class="table table-condensed table-hover" width="100%">
                <tbody>
                 	<tr>
                        <td colspan="2">
                            <label class="control-label x100">上级机构编码：</label>
                            <input type="text"  id="porgCode" name="porgCode" value="${vo.porgCode}"  readonly="readonly" size="20">
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2">
                            <label class="control-label x100">机构名称：</label>
                            <input type="text" name="orgName"  data-rule="required" value="" size="20">
                        </td>
                    </tr>
                      <tr>
                        <td colspan="2">
                            <label class="control-label x100">机构编码：</label>
                            <input type="text" id="orgCode" name="orgCode" data-rule="required"  value=""  size="20">
                            <span>父编码+XX</span>
                        </td>
                    </tr>
                      <tr>
                        <td colspan="2">
                            <label class="control-label x100">机构类型：</label>
                            <input type="text" name="orgType"  value="" size="20">
                        </td>
                    </tr>
                      <tr>
                        <td colspan="2">
                            <label class="control-label x100">负责人：</label>
                            <input type="text" name="orgLeader" value="" size="20">
                        </td>
                    </tr>
                      <tr>
                        <td colspan="2">
                            <label class="control-label x100">联系电话：</label>
                            <input type="text" name="contactPhone" value="" size="30">
                        </td>
                    </tr>
                       <tr>
                        <td colspan="2">
                            <label class="control-label x100">联系地址：</label>
                            <input type="text" name="orgAddr" value="" size="30">
                        </td>
                    </tr>
                    
                      <tr>
                        <td colspan="2">
                            <label class="control-label x100">MSN/QQ：</label>
                            <input type="text" name="contMsg" value="" size="30">
                        </td>
                    </tr>
                      <tr>
                        <td colspan="2">
                            <label class="control-label x100">备注：</label>
                            <input type="text" name="remark" value="" size="30">
                        </td>
                    </tr>
                   <tr>
                        <td colspan="2">
                            <label class="control-label x100">排序：</label>
                            <input type="text" name="intOrder" value="" size="30">
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>
    </form>
</div>

<div class="bjui-pageFooter">
    <ul>
        <li><button type="button" class="btn-close" data-icon="close">关闭</button></li>
        <li><button type="submit" class="btn-default" data-icon="save">保存</button></li>
    </ul>
</div>